#include "FoGGEDEF.h"
#include "GVVector.h"



namespace _FOGGE_
{
	namespace _GDB_
	{
		GVVector::GVVector(::_FO_GDB::GVContainer* ptrGVContainer,::_FO_UTIL::Name name)
			:GV(ptrGVContainer,name,::_FO_UTIL::Name(__T("Vector")))
		{
		}

		GVVector::~GVVector(void)
		{
		}

		const ::_FO_UTIL_MATH::Vector& GVVector::GetValue()
		{
			return m_vecValue;
		}
		void GVVector::SetValue(const ::_FO_UTIL_MATH::Vector& value)
		{
			static TCHAR tempv[1024];
			_stprintf_s(tempv,1024,__T("(%f,%f,%f,%f"),value.x,value.y,value.z,value.w);
			Set(tempv);
		}

		void GVVector::ValueUpdated()
		{
			//convert value;
			_stscanf_s(m_strValue.c_str(),__T("(%f,%f,%f,%f"),m_vecValue.x,m_vecValue.y,m_vecValue.z,m_vecValue.w);
		}
	}
}